package s2elinshu;

import java.util.Scanner;

public class J09Retangle {
	public static void main(String[] args) {
		String str[] = new String[2];
		double width[] = new double[2];
		double height[] = new double[2];
		double area[] = new double[2];
		double permeter[] = new double[2];

// 면적, 둘레 계산
		inPutRetangle(str, width, height);
		getArea(area, width, height);
		getPermeter(permeter, width, height);
		
		System.out.println(str[1]);
		System.out.println(area[1]);
		System.out.println(permeter[1]);
		

	} // main 닫음
	// 사각형 가로, 세로, 색상 입력
	public static void inPutRetangle(String  str[], double  width[],
			double height[]) {
		Scanner sc = null;
		sc = new Scanner(System.in);
		System.out.println("가로는?");
		width[1] = sc.nextInt();
		System.out.println("세로는?");
		height[1] = sc.nextInt();
		System.out.println("색상은?");
		str[1] = sc.next();
		sc.close();
	}

	public static void getArea(double  area[], double  width[], double  height[]) {
		area[1] = width[1] * height[1];
	}

	public static void getPermeter(double  permeter[], double  width[], double  height[]) {
		permeter[1] = 2 * (width[1] + height[1]);
	}

} // class 닫음

